package com.histone.lib_download.contract;


import com.histone.lib_download.downloader.FileInfo;

/**
 * @author robin
 * @version v1.0 [2020/6/15]
 * 下载进度回调（线程不安全）
 */
public interface IDownloadProgress {
    /**
     * 来自子线程
     *
     * @param finished 完成的
     * @param length   总长
     */
    void onAsyncProgress(long finished, long length);

    void onDownloadSuccess(FileInfo fileInfo);

    void onDownloadError(Throwable throwable);
}
